Repository navigation
agx: remove compiler probes and diagnostics - #498
Merged
Merged
Conversation
These switches, all off by default, served bring-up of features that are finished. Each makes the compiler emit code that is wrong for the application (probe values in place of outputs, capture stores to a fixed address, a different coefficient source, a missing lowering) or prints refusal details through a separate ad-hoc variable. Remove them with their code: - ASAHI_G17P_EMPTY_FS_PIXEL_DIAGNOSTIC: pixel entry and release in an empty G17P fragment shader. - ASAHI_M5_TILE_DATA_COPY_PROBE: copies of M5 multisample tile data before ST_TILE. - ASAHI_MESH_PP_AUDIT, ASAHI_MESH_MARKER_VA and ASAHI_MESH_PP_AUDIT_FAN: capture stores of the mesh per-primitive records. - ASAHI_MESH_PP_PROBE: storage addresses in place of the VAR0 output. - ASAHI_MESH_NATIVE_PAGE_CARRIER: a one-word page carrier for the per-primitive storage address; the default two-word carrier is now the PAGE_CARRIER_WORDS constant. - ASAHI_MESH_CONTRACT_DEBUG: refusal prints in the Gen1 mesh lowering. - ASAHI_MESH_PP_VIT_SOURCE: override of the PrimitiveID coefficient source. - ASAHI_G17P_CAPTURE_SCS_INDEX: capture store of the SCS thread index in ray-query kernels. - ASAHI_G17P_RQ_LOWERING_DIAGNOSTIC: refusal print of the Gen1 ray-query lowering. - ASAHI_G17P_COMPUTE_HW_DERIVATIVE_DIAGNOSTIC: skipping the compute derivative lowering. - ASAHI_G17P_ZERO_COLOUR_RELEASE_DIAGNOSTIC: a zero colour release mask for G17P background and end-of-tile programs. With no variable set the generated code is unchanged; every removed branch was off by default. The precompiled libagx output is byte-identical. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Mesh lowering, the G17P ray-query lowering, compute derivatives, the G17P graphics program and empty-fragment packing carried off-by-default probes and diagnostics read from the environment (ASAHI_MESH_CONTRACT_DEBUG, _PP_AUDIT, _MARKER_VA, _PP_AUDIT_FAN, _PP_PROBE, _PP_VIT_SOURCE, _NATIVE_PAGE_CARRIER, ASAHI_G17P_CAPTURE_SCS_INDEX, _RQ_LOWERING_DIAGNOSTIC, _COMPUTE_HW_DERIVATIVE_DIAGNOSTIC, _ZERO_COLOUR_RELEASE_DIAGNOSTIC, _EMPTY_FS_PIXEL_DIAGNOSTIC, ASAHI_M5_TILE_DATA_COPY_PROBE).
Change
Delete them with their code paths. ASAHI_MESH_NATIVE_PAGE_CARRIER's unset value (2 words) becomes PAGE_CARRIER_WORDS. Default code generation is unchanged on every chip.
Testing
x86 build (clang, release, asserts on) with
-Dbuild-tests=true:meson test --suite asahi138/138 pass, same as aurora-wip.The precompiled libagx output (libagx.{h,cpp,spv}, libagx_shaders.{c,h}) is byte-identical to aurora-wip, so internal kernels for every target compile to the same code.
Merged with the other cleanup branches on top of current aurora-wip c55152d: clean merge, 138/138.
Combined with all HACK-MESA PRs on aurora-wip c55152d, M1 Pro (G13S, AGX2) overlay A/B against the tip built with the same toolchain: deqp-vk 195,000 common cases (mesh, multiview, ray query, compute, render passes, query pools, multisample), 46,267 Pass / 148,733 NotSupported in both arms, 0 changed; extension sets identical; glmark2 8672/8844 vs 8617/8746, vkmark 10805/10842 vs 10777 (noise); no kernel, GPU or firmware errors.
Combined with all HACK-MESA PRs on aurora-wip cc932aa, M4 Pro J616s (G17P) overlay A/B against the tip built with the same toolchain: deqp-vk 228,000 common cases, the only change is dEQP-VK.mesh_shader.ext.properties.max_view_index Pass -> Fail from hk: report the real maxMeshMultiviewViewCount #494 (CTS view-mask defect, CTS: mesh_shader max_view_index view mask overflows at 32 views (expected failure on G17P) #516; only layer 0 is drawn); extension sets identical; glmark2 12670/12542 vs 13244/13385, vkmark 11928/11958 vs 12116/12110 (single order, not claimed); no kernel, GPU or firmware errors. ray_query.stress was excluded from both arms after it crashed the GPU firmware in the baseline arm (G17P: GPU firmware crash with parallel dEQP-VK.ray_query.stress cases (M4 Pro) #543).
Same combined tree on the MacBook Neo (A18 Pro, G17P): deqp-vk 183,000 common cases, again only the expected max_view_index change; glcts subset 14,000 common, 0 changed; glmark2/vkmark measured in both orders, means within 0.7 % (noise); no kernel, GPU or firmware errors.
Still to run
Details
ASAHI_G17P_COMPUTE_IMPLICIT_LOD_DIAGNOSTIC stays for now because hk_nir_lower_descriptors.c also calls it; it goes in a joint follow-up. 9 files, +22 / -330.
Assisted-by: LLM (Claude:Opus 5.5)